home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / cmdity / scrntb20.lha / ScreenTab / Installation-Script < prev    next >
Text File  |  1996-04-28  |  14KB  |  532 lines

  1. ; Installation-Script for ScreenTab V2.0
  2. ; Author: Michael Link
  3. ; First creation : 28.10.94
  4. ; Last change    : 28.04.96
  5.  
  6. ; ----- English string section -----
  7.  
  8. (set #bad-version
  9.     (cat "\n\nSorry, but ScreenTab requires\n"
  10.          "at least Kickstart 2.04"
  11.     )
  12. )
  13.  
  14. (set #scrtab-installed
  15.     (cat "\n\nScreenTab is already running on your system.\n"
  16.          "If you want to install the new version in the same\n"
  17.          "same directory as the old, the installation must\n"
  18.          "stop the ScreenTab-Task. This could cause system\n"
  19.          "instability until the next reboot.\n\n"
  20.          "Do you want to continue ?"
  21.     )
  22. )
  23.  
  24. (set #help-dir
  25.     (cat "You must enter the name of the directory, in which\n"
  26.          "ScreenTab shall be installed.\n\n"
  27.          "If you want ScreenTab to be active everytime you\n"
  28.          "start the computer, enter the directory\n"
  29.          "\"SYS:WBStartup\", which is the default directory."
  30.     )
  31. )
  32.  
  33. (set #dir-request
  34.     (cat "Please enter the destination directory\n"
  35.          "for ScreenTab"
  36.     )
  37. )
  38.  
  39. (set #prefs-dir-request
  40.     (cat "Please enter the destination directory\n"
  41.          "for the ScreenTab-Preferences"
  42.     )
  43. )
  44.  
  45. (set #which-hotkey
  46.     (cat "\n\nWith which key combination shall the\n"
  47.          "preferences be called ?"
  48.     )
  49. )
  50.  
  51. (set #which-scrkey
  52.     (cat "\n\nWith which key combination shall the\n"
  53.          "screens be switched ?\n\n"
  54.          "(Don't use any of the SHIFT-Keys, because\n"
  55.          "ScreenTab needs them for back-switching !)"
  56.     )
  57. )
  58.  
  59. (set #which-winkey
  60.     (cat "\n\nWith which key combination shall the\n"
  61.          "windows be switched ?\n\n"
  62.          "(Don't use any of the SHIFT-Keys, because\n"
  63.          "ScreenTab needs them for back-switching !)"
  64.     )
  65. )
  66.  
  67. (set #write-tooltypes
  68.     "\nWriting Tool-Types ..."
  69. )
  70.  
  71. (set #old-prefs-file
  72.     (cat "\n\nThere's an older preferences file installed\n"
  73.          "on your system. If you want to use these\n"
  74.          "preferences, they must be converted.\n\n"
  75.          "Do you want to do this ?"
  76.     )
  77. )
  78.  
  79. (set #ask-brushes
  80.     (cat "\n\nDo you want to install the\n"
  81.          "included image-files ?\n"
  82.          "(Needs about 9 KB disk space)"
  83.     )
  84. )
  85.  
  86. (set #ask-brushes-dir
  87.     (cat "In which directory shall I create\n"
  88.          "the ScreenTab-Images-Directory ?"
  89.     )
  90. )
  91.  
  92. (set #ask-catalogs
  93.     "\nWhich language catalogs shall be installed ?\n"
  94. )
  95.  
  96. (set #ask-assign-brushes
  97.     (cat "\n\nDo you want to add an ASSIGN to\n"
  98.          "the image directory in S:User-Startup ?"
  99.     )
  100. )
  101.  
  102. (set #ask-scrnotify
  103.     (cat "\n\nIf available, ScreenTab uses\n"
  104.          "the ScreenNotify-Library to react on changes\n"
  105.          "of the Workbench resolution.\n\n"
  106.          "Do you want to install this library ?"
  107.     )
  108. )
  109.  
  110. (set #ask-scrnotify-help
  111.     (cat "The usage of this library is optional.\n"
  112.          "But if the Workbench resolution is changed\n"
  113.          "without this library installed, it can\n"
  114.          "cause system instability or crashes.\n\n"
  115.          "If you don't want to use an installed\n"
  116.          "ScreenNotify-Library, set the tool-type\n"
  117.          "USESCREENNOTIFY to NO."
  118.     )
  119. )
  120.  
  121. (set #copy-screentab
  122.     "\n\nCopying ScreenTab ..."
  123. )
  124.  
  125. (set #copy-screentabprefs
  126.     "\n\nCopying ScreenTabPrefs ..."
  127. )
  128.  
  129. (set #copy-brushes
  130.     "\n\nCopying Image-Files ..."
  131. )
  132.  
  133. (set #copy-scrnotify
  134.     "\n\nCopying ScreenNotify-Library ..."
  135. )
  136.  
  137. (set #copy-catalogs
  138.     "\n\nCopying language catalogs ..."
  139. )
  140.  
  141. (set #lang-german
  142.     "German"
  143. )
  144.  
  145. (set #catalog-german
  146.     "deutsch"
  147. )
  148.  
  149. (set #error-conversion
  150.     "Error during conversion !!!"
  151. )
  152.  
  153.  
  154. ; ----- German string section -----
  155.  
  156. (if (= @language "deutsch")
  157. (
  158.  
  159. (set #bad-version
  160.     (cat "\n\nSorry, aber ScreenTab läuft erst ab\n"
  161.          "Kickstart 2.04."
  162.     )
  163. )
  164.  
  165. (set #scrtab-installed
  166.     (cat "\n\nScreenTab ist bereits auf Ihrem System aktiv.\n"
  167.          "Falls Sie die neue Version in dasselbe Verzeichnis\n"
  168.          "installieren wollen wie die alte, muss der\n"
  169.          "ScreenTab-Task beendet werden. Dies kann u. U. zu\n"
  170.          "Instabilitäten des Systems bis zum nächsten Reset\n"
  171.          "führen.\n\n"
  172.          "Wollen Sie trotzdem weitermachen ?"
  173.     )
  174. )
  175.  
  176. (set #help-dir
  177.     (cat "An dieser Stelle müssen Sie angeben, in welchem\n"
  178.       "Verzeichnis ScreenTab installiert werden soll.\n\n"
  179.       "Wenn ScreenTab gleich nach dem Start des Computers\n"
  180.       "aktiv sein soll, sollten Sie als Zielverzeichnis\n"
  181.       "\"SYS:WBStartup\" angeben."
  182.     )
  183. )
  184.  
  185. (set #dir-request
  186.     (cat "Geben Sie jetzt das Verzeichnis an,\n"
  187.          "in dem ScreenTab installiert werden soll."
  188.     )
  189. )
  190.  
  191. (set #prefs-dir-request
  192.     (cat "Geben Sie jetzt das Verzeichnis an, in das das\n"
  193.          "Einstellungsprogramm kopiert werden soll."
  194.     )
  195. )
  196.  
  197. (set #which-hotkey
  198.     (cat "\n\nMit welcher Tastenkombination sollen die\n"
  199.          "ScreenTab-Voreinstellungen aufgerufen werden ?"
  200.     )
  201. )
  202.  
  203. (set #which-scrkey
  204.     (cat "\n\nMit welcher Tastenkombination sollen die\n"
  205.          "Screens umgeschaltet werden ?\n\n"
  206.          "(Bitte geben Sie hier keine SHIFT-Taste an, da\n"
  207.          "diese für das Zurückblättern gebraucht werden !)"
  208.     )
  209. )
  210.  
  211. (set #which-winkey
  212.     (cat "\n\nMit welcher Tastenkombination sollen die\n"
  213.          "Fenster umgeschaltet werden ?\n\n"
  214.          "(Bitte geben Sie hier keine SHIFT-Taste an, da\n"
  215.          "diese für das Zurückblättern gebraucht werden !)"
  216.     )
  217. )    
  218.  
  219. (set #write-tooltypes
  220.     "\nSchreibe Tool-Types ..."
  221. )
  222.  
  223. (set #old-prefs-file
  224.     (cat "\n\nEine ältere Voreinstellungsdatei ist auf\n"
  225.          "ihrem System installiert. Um diese Einstellungen\n"
  226.          "mit der neuen Version nutzen zu können, muß\n"
  227.          "eine Konvertierung vorgenommen werden.\n\n"
  228.          "Wollen Sie das ?"
  229.     )
  230. )   
  231.  
  232. (set #ask-brushes
  233.     (cat "\n\nWollen Sie die mitgelieferten Image-Dateien\n"
  234.          "installieren ? (Benötigt ca. 9 KB Plattenplatz)"
  235.     )
  236. )
  237.  
  238. (set #ask-brushes-dir
  239.     (cat "In welches Verzeichnis sollen die Image-Dateien\n"
  240.          "kopiert werden ? Ein Verzeichnis mit dem Namen\n"
  241.          "'ScreenTab-Images' wird dort angelegt"
  242.     )
  243. )
  244.  
  245. (set #ask-catalogs
  246.     "\nWelche Sprach-Kataloge sollen installiert werden ?\n"
  247. )
  248.  
  249. (set #ask-assign-brushes
  250.     (cat "\n\nSoll ein ASSIGN auf das Image-Verzeichnis\n"
  251.          "angelegt werden (in S:User-Startup) ?"
  252.     )
  253. )
  254.  
  255. (set #ask-scrnotify
  256.     (cat "\n\nScreenTab benutzt, falls vorhanden,\n"
  257.          "die ScreenNotify-Library, um auf Wechsel der\n"
  258.          "Workbench-Auflösung reagieren zu können.\n\n"
  259.          "Wollen Sie diese Library installieren ?"
  260.     )
  261. )
  262.  
  263. (set #ask-scrnotify-help
  264.     (cat "Die Benutzung dieser Library ist optional.\n"
  265.          "Allerdings kann es zu Fehlern oder Abstürzen\n"
  266.          "kommen, wenn die Workbench-Auflösung ohne\n"
  267.          "installierte Library gewechselt wird.\n\n"
  268.          "Wenn Sie auf die ScreenNotify-Library\n"
  269.          "verzichten wollen, können Sie dies gezielt\n"
  270.          "mit dem Tool-Type USESCREENNOTIFY unterbinden,\n"
  271.          "indem Sie ihn auf NO setzen."
  272.     )
  273. )
  274.  
  275. (set #copy-screentab
  276.     "\n\nKopiere ScreenTab ..."
  277. )
  278.  
  279. (set #copy-screentabprefs
  280.     "\n\nKopiere ScreenTabPrefs ..."
  281. )
  282.  
  283. (set #copy-brushes
  284.     "\n\nKopiere Image-Dateien ..."
  285. )
  286.  
  287. (set #copy-scrnotify
  288.     "\n\nKopiere ScreenNotify-Library ..."
  289. )
  290.  
  291. (set #copy-catalogs
  292.     "\n\nKopiere Sprachkataloge ..."
  293. )
  294.  
  295. (set #lang-german
  296.     "Deutsch"
  297. )
  298.  
  299. (set #catalog-german
  300.     "deutsch"
  301. )
  302.  
  303. (set #error-conversion
  304.     "Fehler beim Konvertieren !!!"
  305. )
  306.  
  307. )
  308. ) ; endif
  309.  
  310.  
  311. ; ----- different version numbers -----
  312.  
  313. (set intuition_vernum (getversion "intuition.library" (resident)))
  314. (set intuition_ver    (shiftright intuition_vernum 16))
  315. (set locale_vernum    (getversion "locale.library" (resident)))
  316. (set locale_ver       (shiftright locale_vernum 16))
  317. (set scrntfy_vernum   (getversion "LIBS:screennotify.library"))
  318. (set scrntfy_ver      (shiftright scrntfy_vernum 16))
  319.  
  320. (if (< intuition_ver 37)
  321.     (abort #bad-version)
  322. )
  323.  
  324. ; ***********************************************************************
  325. ; * ScreenTab already running ?                                         *
  326. ; ***********************************************************************
  327.  
  328. (if (run "HandleScrTab CHECK" (safe))
  329.     (if (askbool (prompt #scrtab-installed)
  330.                  (help)
  331.                  (default 1)
  332.         )
  333.         (run "HandleScrTab STOP")
  334.         (exit (quiet))
  335.     )
  336. )
  337.  
  338. ; ***********************************************************************
  339. ; * Ask for destination directory                                       *
  340. ; ***********************************************************************
  341.  
  342. (set DIR (askdir (prompt #dir-request)
  343.                  (help #help-dir)
  344.                  (default "SYS:WBStartup")
  345.          )
  346. )
  347.  
  348. (set PREFSDIR (askdir (prompt #prefs-dir-request)
  349.                       (help @askdir-help)
  350.                       (default "SYS:Prefs")
  351.               )
  352. )
  353.  
  354.  
  355. ; ***********************************************************************
  356. ; * Tool-Types                                                          *
  357. ; ***********************************************************************
  358.  
  359. (set @default-dest PREFSDIR)
  360.  
  361. (copyfiles (prompt #copy-screentabprefs)
  362.            (help @copyfiles-help)
  363.            (source "Prefs/ScreenTabPrefs")
  364.            (dest PREFSDIR)
  365.            (infos)
  366. )
  367.  
  368. (set @default-dest DIR)
  369.  
  370. (set HOTKEY (askstring (prompt #which-hotkey)
  371.                        (help @askstring-help)
  372.                        (default "ctrl alt s")
  373.             )
  374. )
  375.  
  376. (set SWITCHKEY (askstring (prompt #which-scrkey)
  377.                           (help @askstring-help)
  378.                           (default "LCommand Tab")
  379.                )
  380. )  
  381.  
  382. (set WINSWITCHKEY (askstring (prompt #which-winkey)
  383.                           (help @askstring-help)
  384.                           (default "LCommand `")
  385.                   )
  386. )
  387.  
  388. (tooltype (prompt #write-tooltypes)
  389.           (help)
  390.           (dest "ScreenTab")
  391.           (settooltype "CX_POPKEY" HOTKEY)
  392.           (settooltype "SWITCHKEY" SWITCHKEY)
  393.           (settooltype "WINSWITCHKEY" WINSWITCHKEY)
  394.           (settooltype "PREFSDIR" PREFSDIR)
  395. )
  396.  
  397. (copyfiles (prompt #copy-screentab)
  398.            (help @copyfiles-help)
  399.            (source "ScreenTab")
  400.            (dest DIR)
  401.            (infos)
  402. )
  403.  
  404.  
  405. ; ***********************************************************************
  406. ; * Checking for preferences file and need for conversion               *
  407. ; ***********************************************************************
  408.  
  409. (if (exists "ENVARC:ScreenTab.prefs")
  410.     (if (= (run "HandleScrTab PREFSVERSION" (safe) ) 2)
  411.         (
  412.             (if (askbool (prompt #old-prefs-file)
  413.                          (help)
  414.                          (default 1)
  415.                 )
  416.                 (if (= (run "HandleScrTab CONVERTPREFS" (safe) ) 0)
  417.                     (copyfiles (prompt)
  418.                                (help)
  419.                                (source "T:SCRT.TMP")
  420.                                (dest "ENVARC:")
  421.                                (newname "ScreenTab.prefs")
  422.                     )
  423.                     (message #error-conversion)
  424.                 )
  425.             )
  426.         )
  427.     )
  428.     (copyfiles (prompt #copy-preferences)
  429.                (help)
  430.                (source "ScreenTab.prefs")
  431.                (dest "ENVARC:")
  432.     )
  433. )
  434.  
  435.  
  436. ; ***********************************************************************
  437. ; * Copying of the IFF-Brushes                                          *
  438. ; ***********************************************************************
  439.  
  440. (if (askbool (prompt #ask-brushes)
  441.              (help)
  442.              (default 1)
  443.     )
  444.     (
  445.         (set BRUSH_DIR (askdir (prompt #ask-brushes-dir)
  446.                                (help @askdir-help)
  447.                                (default "SYS:Prefs")
  448.                        )
  449.         )
  450.  
  451.         (set BRUSH_DIR (tackon BRUSH_DIR "ScreenTab-Images"))
  452.  
  453.         (makedir BRUSH_DIR
  454.                  (prompt)
  455.                  (help @makedir-help)
  456.         )
  457.  
  458.         (copyfiles (prompt #copy-brushes)
  459.                    (help)
  460.                    (source "ScreenTab-Images")
  461.                    (dest BRUSH_DIR)
  462.                    (pattern "#?.bsh")
  463.                    (files)
  464.         )
  465.  
  466.         (startup "ScreenTab"
  467.             (prompt #ask-assign-brushes)
  468.             (help)
  469.             (command "Assign ScreenTab: \"" BRUSH_DIR "\"")
  470.         )
  471.     )
  472. )
  473.  
  474.  
  475. ; ***********************************************************************
  476. ; * Installation of the ScreenNotify-Library                            *
  477. ; ***********************************************************************
  478.  
  479. (if (= scrntfy_ver 0)
  480.     (if (askbool (prompt #ask-scrnotify)
  481.                  (help   #ask-scrnotify-help)
  482.                  (default 1)
  483.         )
  484.         (copylib (prompt #copy-scrnotify)
  485.                  (help)
  486.                  (source "libs/screennotify.library")
  487.                  (dest   "LIBS:")
  488.                  (confirm)
  489.         )
  490.     )
  491. )
  492.  
  493.  
  494. ; ***********************************************************************
  495. ; * Installation of the catalogs                                        *
  496. ; ***********************************************************************
  497.  
  498. (if (>= locale_ver 38)
  499.     (
  500.         (set CATALOGS (askoptions (prompt #ask-catalogs)
  501.                                   (help)
  502.                                   (choices #lang-german)
  503.                                   (default 1)
  504.                       )
  505.         )
  506.  
  507.         (set n 0)
  508.  
  509.         (while (set language (select n #catalog-german ""))
  510.             (if (IN CATALOGS n)
  511.                 (
  512.                     (set SRCPATH (cat "catalogs/"
  513.                                       language
  514.                                  )
  515.                     )
  516.  
  517.                     (set DSTPATH (tackon "LOCALE:Catalogs" language))
  518.  
  519.                     (copyfiles (prompt #copy-catalogs)
  520.                                (help)
  521.                                (source SRCPATH)
  522.                                (dest   DSTPATH)
  523.                                (pattern "#?.catalog")
  524.                     )
  525.                 )
  526.             )
  527.             (set n (+ n 1))
  528.         )
  529.     )
  530. )
  531.  
  532.